home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel PPC / lib_show / animal / animal.e next >
Encoding:
Text File  |  1996-06-13  |  836 b   |  46 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. deferred class ANIMAL
  5.  
  6. feature {ANY}
  7.    
  8.    cri: STRING is
  9.       deferred
  10.       end;
  11.    
  12.    crier2 is
  13.       do
  14.      std_output.put_string(cri);
  15.       end;
  16.    
  17.    crier is
  18.       deferred
  19.       end;
  20.    
  21.    reproduction(autre: ANIMAL): ANIMAL is
  22.       require
  23.      autre /= Void
  24.       do
  25.      Result := autre;
  26.       end;
  27.    
  28.    reproduction_avec_quadrupede(autre: QUADRUPEDE): ANIMAL is
  29.       require
  30.      autre /= Void
  31.       do
  32.      Result := autre;
  33.       end;
  34.    
  35.    felicitations(autre: ANIMAL) is
  36.       do
  37.      Current.crier2;
  38.      std_output.put_string(" + ");
  39.          autre.crier;
  40.          std_output.put_string(" = ");
  41.          Current.reproduction(autre).crier;
  42.          std_output.put_new_line;
  43.       end;
  44.    
  45. end -- ANIMAL
  46.